<%-- 
    Document   : index
    Created on : 14 mars 2013, 09:15:28
    Author     : Paul
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
    <td><a href="/WebApplication_GestionNotes/ServletTest1">Test communication entre 2 Servlets</a></td>
    </br>
    <c:choose>
        <c:when test="${not empty sessionScope.personne}"> <%-- redéfinir la condition --%>
            <c:out value="${sessionScope.personne.nom}" />
            </br>
            <a href="/WebApplication_GestionNotes/Deconnexion">Déconnexion</a>
            </br>
            <c:if test="${not empty sessionScope.enseignant}">
                <a href="/WebApplication_GestionNotes/view/administrationAccueil.jsp">Administration</a>
            </c:if>
            <c:if test="${not empty sessionScope.etudiant}">
                <td><a href="/WebApplication_GestionNotes/view/recapNotes.jsp">Récapitulatif des notes</a></td>
            </c:if>
            <td><a href="/WebApplication_GestionNotes/RecapNotes">Test</a></td>
        </c:when>
        <c:when test="${ not empty deconnexion}">
            <c:out value="${deconnexion}"/>
        </c:when>
        <c:otherwise>
            <td><a href="/WebApplication_GestionNotes/view/connexion.jsp">Connexion</a></td>
        </c:otherwise>
    </c:choose>
</body>
</html>
